
<div class="tab-pane " id="grid_lottery">
    {if $system['lottery']==1}
    <!--抽奖规则-->
    <div class="panel panel-default" role="tabpanel" style="">
        <div class="panel-heading">抽奖规则</div>
        <div class="panel-body" style="">
            {if $system['softmode']==1 && $system['is_new_wxapp']==1}

            <div class="form-group">
                <label class="col-sm-2 col-xs-12 control-label">抽奖样式</label>
                <div class="col-sm-8 col-xs-12">
                    <label class="radio-inline">
                        <input name="yx_lt_mode" value="1" {if $config['yx_lt_mode']==1} checked="checked"{/if} type="radio"> 独立页
                    </label>
                    <label class="radio-inline">
                        <input name="yx_lt_mode" value="0" {if $config['yx_lt_mode']==0} checked="checked"{/if} type="radio"> 页面集成
                    </label>
                    <span class="help-block">备注：独立页为活动页与抽奖页面独立;<span style="color: red;">修改此项先保存后，再次修改其他关联项</span></span>
                </div>
            </div>

            {/if}

            <div class="form-group">
                <label class="col-sm-2 col-xs-12 control-label">抽奖时间限制</label>
                <div class="col-sm-9 col-md-8 col-lg-8 col-xs-12">
                    <label class="radio-inline">
                        <input name="is_limit_end_time" value="0" {if $config['is_limit_end_time']==0} checked="checked"{/if} type="radio"> 跟随活动时间
                    </label>
                    <label class="radio-inline">
                        <input name="is_limit_end_time" value="1" {if $config['is_limit_end_time']==1} checked="checked"{/if} type="radio"> 设置时间开启与关闭
                    </label>
                </div>
            </div>
            {if $config['is_limit_end_time']==1}
            <div class="form-group">
                <label class="col-sm-2 col-xs-12 control-label">抽奖生效时间</label>
                <div class="col-sm-8 col-xs-12">
                    {php $config['yx_lt_begintime']<$theme['begintime']?($config['yx_lt_begintime']=$theme['begintime']).($config['yx_lt_endtime']=$theme['endtime']):"";}
                    {php echo view_form_field_daterange('yx_lt_time', array('start'=>date('Y-m-d H:i:s',$config['yx_lt_begintime']),'end'=>date('Y-m-d H:i:s',$config['yx_lt_endtime'])), true);}
                    <span class="help-block">未到开始时间前端不显示抽奖，抽奖结束隐藏页面，显示抽奖记录图标</span>
                </div>
            </div>
            {/if}



            <div class="form-group">
                <label class="col-sm-2 col-xs-12 control-label">抽奖模式</label>
                <div class="col-sm-9 col-md-8 col-lg-8 col-xs-12">
                    <label class="radio-inline">
                        <input name="yx_lt_double_flag" value="1" {if $config['yx_lt_double_flag']==1} checked="checked"{/if} type="radio"> 奖品可重复
                    </label>
                    <label class="radio-inline">
                        <input name="yx_lt_double_flag" value="0" {if $config['yx_lt_double_flag']==0} checked="checked"{/if} type="radio"> 奖品不重复
                    </label>

                    <span class="help-block">温馨提示：奖品不重复，抽奖机会上限为8次</span>
                </div>
            </div>

            <div class="form-group" id="convert_only" >
                <label class="col-sm-2 col-xs-12 control-label">奖品唯一性兑换</label>
                <div class="col-sm-9 col-md-8 col-lg-8 col-xs-12">
                    <label class="radio-inline">
                        <input name="yx_lt_convert_only" value="0" {if $config['yx_lt_convert_only']==0} checked="checked"{/if} type="radio"> 开启
                    </label>
                    <label class="radio-inline">
                        <input name="yx_lt_convert_only" value="1" {if $config['yx_lt_convert_only']==1} checked="checked"{/if} type="radio"> 关闭
                    </label>
                    <span class="help-block">开启唯一性后，所有中奖奖品只能兑换一个</span>
                </div>
            </div>


            <div class="form-group">
                <label class="col-sm-2 col-xs-12 control-label">抽奖的前提条件</label>
                <div class="col-sm-9 col-md-8 col-lg-8 col-xs-12">
                    <label class="radio-inline">
                        <input name="yx_lt_con" value="0" {if $config['yx_lt_con']==0} checked="checked"{/if} type="radio"> 无限制
                    </label>
                    <label class="radio-inline">
                        <input name="yx_lt_con" value="1" {if $config['yx_lt_con']==1} checked="checked"{/if} type="radio"> 已支付
                    </label>
                    <label class="radio-inline">
                        <input name="yx_lt_con" value="2" {if $config['yx_lt_con']==2} checked="checked"{/if} type="radio"> 补款客户
                    </label>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 col-xs-12 control-label">客资收集</label>
                <div class="col-sm-9 col-md-8 col-lg-8 col-xs-12">
                    <label class="radio-inline">
                        <input name="yx_lt_receive_con" value="0" {if $config['yx_lt_receive_con']==0} checked="checked"{/if} type="radio"> 抽奖前
                    </label>
                    <label class="radio-inline">
                        <input name="yx_lt_receive_con" value="1" {if $config['yx_lt_receive_con']==1} checked="checked"{/if} type="radio"> 抽奖后
                    </label>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 col-xs-12 control-label">允许员工参与抽奖</label>
                <div class="col-sm-9 col-md-8 col-lg-8 col-xs-12">
                    <label class="radio-inline">
                        <input name="yx_lt_has_worker" value="0" {if $config['yx_lt_has_worker']==0} checked="checked"{/if} type="radio">不允许
                    </label>
                    <label class="radio-inline">
                        <input name="yx_lt_has_worker" value="1" {if $config['yx_lt_has_worker']==1} checked="checked"{/if} type="radio"> 允许
                    </label>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 col-xs-12 control-label">新用户判断条件</label>
                <div class="col-sm-9 col-md-8 col-lg-8 col-xs-12">
                    <label class="radio-inline">
                        <input name="yx_lt_new_fan_terms" value="0" {if $config['yx_lt_new_fan_terms']==0} checked="checked"{/if} type="radio"> 不限制
                    </label>
                    <label class="radio-inline">
                        <input name="yx_lt_new_fan_terms" value="1" {if $config['yx_lt_new_fan_terms']==1} checked="checked"{/if} type="radio"> 授权手机号
                    </label>
                    <label class="radio-inline">
                        <input name="yx_lt_new_fan_terms" value="2" {if $config['yx_lt_new_fan_terms']==2} checked="checked"{/if} type="radio"> 授权头像
                    </label>
                </div>
            </div>

        </div>
    </div>
<!--按钮文字设置-->
{if $system['softmode']==1 && $system['is_new_wxapp']==1}
    <div class="panel panel-default" id="btn_font_set" role="tabpanel"  {if !$config['yx_lt_mode']}style="display:none;"{/if}>
        <div class="panel-heading">独立页按钮文字设置</div>
        <div class="panel-body" style="">
<!--            活动首页-->
            <div class="form-group">
                <label class="col-sm-2 col-xs-12 control-label">活动首页文字</label>
                <div class="col-sm-4 col-xs-12">
                    <div class="input-group">
                        <input type="text" class="form-control"  placeholder="" id="yx_lt_home_txt" name="yx_lt_home_txt"  value="{$config['yx_lt_home_txt']}">
                    </div>
                </div>
                <div class="col-sm-4 col-xs-12">
                    {php echo view_form_field_color('yx_lt_home_txt_c',$config['yx_lt_home_txt_c']);}
                    <span class="help-block">活动首页文字颜色</span>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 col-xs-12 control-label">活动首页文字-背景色</label>
                <div class="col-sm-4 col-xs-12">
                    {php echo view_form_field_color('yx_lt_home_txt_c1',$config['yx_lt_home_txt_c1']);}
                    <span class="help-block">渐变色1</span>
                </div>
                <div class="col-sm-4 col-xs-12">
                    {php echo view_form_field_color('yx_lt_home_txt_c2',$config['yx_lt_home_txt_c2']);}
                    <span class="help-block">渐变色2</span>
                </div>
            </div>
<!--            立即邀请-->
            <div class="form-group">
                <label class="col-sm-2 col-xs-12 control-label">立即邀请文字</label>
                <div class="col-sm-4 col-xs-12">
                    <div class="input-group">
                        <input type="text" class="form-control"  placeholder="" id="yx_lt_invite_txt" name="yx_lt_invite_txt"  value="{$config['yx_lt_invite_txt']}">
                    </div>
                </div>
                <div class="col-sm-4 col-xs-12">
                    {php echo view_form_field_color('yx_lt_invite_txt_c',$config['yx_lt_invite_txt_c']);}
                    <span class="help-block">立即邀请文字颜色</span>
                </div>
            </div>
<!--            已帮TA助力-->
            <div class="form-group">
                <label class="col-sm-2 col-xs-12 control-label">已帮TA助力文字</label>
                <div class="col-sm-4 col-xs-12">
                    <div class="input-group">
                        <input type="text" class="form-control"  placeholder="" id="yx_lt_powered_txt" name="yx_lt_powered_txt"  value="{$config['yx_lt_powered_txt']}">
                    </div>
                </div>
                <div class="col-sm-4 col-xs-12">
                    {php echo view_form_field_color('yx_lt_powered_txt_c',$config['yx_lt_powered_txt_c']);}
                    <span class="help-block">已帮TA助力文字颜色</span>
                </div>
            </div>
<!--            助力TA-->
            <div class="form-group">
                <label class="col-sm-2 col-xs-12 control-label">助力TA文字</label>
                <div class="col-sm-4 col-xs-12">
                    <div class="input-group">
                        <input type="text" class="form-control"  placeholder="" id="yx_lt_power_txt" name="yx_lt_power_txt"  value="{$config['yx_lt_power_txt']}">
                    </div>
                </div>
                <div class="col-sm-4 col-xs-12">
                    {php echo view_form_field_color('yx_lt_power_txt_c',$config['yx_lt_power_txt_c']);}
                    <span class="help-block">助力TA文字颜色</span>
                </div>
            </div>
<!--            我也要参与-->
            <div class="form-group">
                <label class="col-sm-2 col-xs-12 control-label">我也要参与文字</label>
                <div class="col-sm-4 col-xs-12">
                    <div class="input-group">
                        <input type="text" class="form-control"  placeholder="" id="yx_lt_join_txt" name="yx_lt_join_txt"  value="{$config['yx_lt_join_txt']}">
                    </div>
                </div>
                <div class="col-sm-4 col-xs-12">
                    {php echo view_form_field_color('yx_lt_join_txt_c',$config['yx_lt_join_txt_c']);}
                    <span class="help-block">我也要参与文字颜色</span>
                </div>
            </div>
<!--            查看我的抽奖-->
            <div class="form-group">
                <label class="col-sm-2 col-xs-12 control-label">查看我的抽奖文字</label>
                <div class="col-sm-4 col-xs-12">
                    <div class="input-group">
                        <input type="text" class="form-control"  placeholder="" id="yx_lt_my_txt" name="yx_lt_my_txt"  value="{$config['yx_lt_my_txt']}">
                    </div>
                </div>
                <div class="col-sm-4 col-xs-12">
                    {php echo view_form_field_color('yx_lt_my_txt_c',$config['yx_lt_my_txt_c']);}
                    <span class="help-block">查看我的抽奖文字颜色</span>
                </div>
            </div>


<!--            背景色1 立即邀请、我也要参与、查看我的抽奖-->
            <div class="form-group">
                <label class="col-sm-2 col-xs-12 control-label">背景色1</label>
                <div class="col-sm-4 col-xs-12">
                    {php echo view_form_field_color('yx_lt_home_bg1_c1',$config['yx_lt_home_bg1_c1']?$config['yx_lt_home_bg1_c1']:'#C34730');}
                    <span class="help-block">渐变色1</span>
                </div>
                <div class="col-sm-4 col-xs-12">
                    {php echo view_form_field_color('yx_lt_home_bg2_c2',$config['yx_lt_home_bg2_c2']?$config['yx_lt_home_bg2_c2']:'#C34730');}
                    <span class="help-block">渐变色2</span>
                </div>
            </div>
<!--            背景色2 已帮他、助力他-->
            <div class="form-group">
                <label class="col-sm-2 col-xs-12 control-label">背景色2</label>
                <div class="col-sm-4 col-xs-12">
                    {php echo view_form_field_color('yx_lt_home_bg3_c1',$config['yx_lt_home_bg3_c1']?$config['yx_lt_home_bg3_c1']:'#FADC80');}
                    <span class="help-block">渐变色1</span>
                </div>
                <div class="col-sm-4 col-xs-12">
                    {php echo view_form_field_color('yx_lt_home_bg3_c2',$config['yx_lt_home_bg3_c2']?$config['yx_lt_home_bg3_c2']:'#FADC80');}
                    <span class="help-block">渐变色2</span>
                </div>
            </div>

<!--            吸顶颜色-->
            <div class="form-group">
                <label class="col-sm-2 col-xs-12 control-label">吸顶块背景色</label>
                <div class="col-sm-4 col-xs-12">
                    {php echo view_form_field_color('yx_lt_top_info_bg',$config['yx_lt_top_info_bg']);}
                    <span class="help-block">吸顶块背景色</span>
                </div>
            </div>
<!--            字体大小加粗-->
            <div class="form-group">
                <label class="col-sm-2 col-xs-12 control-label">字体大小</label>
                <div class="col-sm-3 col-xs-12">
                    <div class="input-group">
                        <input type="number" class="form-control"  placeholder="" id="yx_lt_ft_size" name="yx_lt_ft_size"  value="{$config['yx_lt_ft_size']}">
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 col-xs-12 control-label">字体加粗</label>
                <div class="col-sm-3 col-xs-12">
                    <div class="input-group">
                        <input type="number" class="form-control"  placeholder="" id="yx_lt_ft_bold" name="yx_lt_ft_bold"  value="{$config['yx_lt_ft_bold']}">
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!--奖品展示图片组-->
    <div class="panel panel-default" id="lt_prize_group" role="tabpanel" {if !$config['yx_lt_mode']}style="display:none;"{/if}>
        <div class="panel-heading">奖品展示图片组设置</div>
        <div class="panel-body" style="">
            <!--            活动首页-->
            <div class="form-group">
                <label class="col-sm-2 col-xs-12 control-label">奖品展示图片组</label>
                <div class="col-sm-4 col-xs-12">
                    <div class="input-group">
                        {php echo view_form_field_multi_image('lt_diy_prize_imgs',$config['lt_diy_prize_imgs']);}
                        <span class="help-block"><span style="color: red;">设置此图片组后 抽奖页面底部奖品展示将展示此图；仅针对单页面样式生效</span></span>
                    </div>
                </div>
            </div>
        </div>
    </div>
{/if}

<!--抽奖机会、按钮文字设置-->
    <div class="panel panel-default" role="tabpanel" style="">
<!--        抽奖机会-->
        <div class="panel-heading">抽奖机会</div>
        <div class="panel-body" style="">

            <div class="form-group">
                <label class="col-sm-2 col-xs-12 control-label">抽奖机会上限</label>
                <div class="col-sm-3 col-xs-12">
                    <div class="input-group">
                        <input type="txt" class="form-control"  placeholder="" id="yx_lt_chance_limit" name="yx_lt_chance_limit"  value="{$config['yx_lt_chance_limit']}">
                        <span class="input-group-addon">次</span>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 col-xs-12 control-label">进入链接可抽</label>
                <div class="col-sm-3 col-xs-12">
                    <div class="input-group">
                        <input type="number" class="form-control"  placeholder="" name="yx_lt_no_sign_up"  value="{$config['yx_lt_no_sign_up']}">
                        <span class="input-group-addon">次</span>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 col-xs-12 control-label">下单抢购可抽</label>
                <div class="col-sm-3 col-xs-12">
                    <div class="input-group">
                        <input type="number" class="form-control"  placeholder="" name="yx_lt_self_order"  value="{$config['yx_lt_self_order']}">
                        <span class="input-group-addon">次</span>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 col-xs-12 control-label">好友抢购</label>
                <div class="col-sm-3 col-xs-12">
                    <div class="input-group">
                        <input type="number" class="form-control"  placeholder="" name="yx_lt_friend_order"  value="{$config['yx_lt_friend_order']}">
                        <span class="input-group-addon">次</span>
                        <select class="form-control" name="yx_lt_main_order">
                            <option value="0" {if !$config['yx_lt_main_order']}selected="selected"{/if}>不限制上级</option>
                            <option value="1" {if $config['yx_lt_main_order'] == 1 }selected="selected"{/if}>限制上级必须支付</option>
                        </select>
                    </div>

                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 col-xs-12 control-label">分享朋友圈加抽</label>
                <div class="col-sm-8 col-xs-12">
                    <div class="input-group">
                        <span class="input-group-addon">第1天</span>
                        <input type="number" class="form-control"  placeholder="" name="yx_lt_first_share_moment"  value="{$config['yx_lt_first_share_moment']}">
                        <span class="input-group-addon">第2天</span>
                        <input type="number" class="form-control"  placeholder="" name="yx_lt_second_share_moment"  value="{$config['yx_lt_second_share_moment']}">
                        <span class="input-group-addon">第3天</span>
                        <input type="number" class="form-control"  placeholder="" name="yx_lt_third_share_moment"  value="{$config['yx_lt_third_share_moment']}">
                        <span class="input-group-addon"></span>
                        <select class="form-control" name="yx_lt_share_moment_user_type">
                            <option value="0" {if !$config['yx_lt_share_moment_user_type']}selected="selected"{/if}>不限制</option>
                            <option value="1" {if $config['yx_lt_share_moment_user_type'] == 1 }selected="selected"{/if}>仅限支付客户</option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="form-group" >
                <label class="col-sm-2 col-xs-12 control-label">好友到访</label>
                <div class="col-sm-8 col-xs-12">
                    <div class="input-group">
                        <input type="number" class="form-control"  placeholder="" name="yx_lt_friend_view"  value="{$config['yx_lt_friend_view']}">
                        <span class="input-group-addon">个好友到访，增加1次抽奖机会;最多</span>
                        <input type="number" class="form-control" min=0 step=1  placeholder="" name="yx_lt_friend_view_limit"  value="{$config['yx_lt_friend_view_limit']}">
                        <span class="input-group-addon">次</span>
                        <span class="input-group-addon"></span>
                        <select class="form-control" name="yx_lt_view_user_type">
                            <option value="0" {if !$config['yx_lt_view_user_type']}selected="selected"{/if}>不限制</option>
                            <option value="1" {if $config['yx_lt_view_user_type'] == 1 }selected="selected"{/if}>仅限支付客户</option>
                        </select>
                    </div>
                </div>
            </div>
            {if $system['softmode']==1 && $system['is_new_wxapp']==1 && $config['yx_lt_mode']}
            <div class="form-group" id="yx_lt_friend_help" >
                <label class="col-sm-2 col-xs-12 control-label">好友助力</label>
                <div class="col-sm-8 col-xs-12">
                    <div class="input-group">
                        <input type="number" class="form-control"  placeholder="" name="yx_lt_friend_help"  value="{$config['yx_lt_friend_help']}">
                        <span class="input-group-addon">个好友助力，增加1次抽奖机会;最多</span>
                        <input type="number" class="form-control" min=0 step=1  placeholder="" name="yx_lt_friend_help_limit"  value="{$config['yx_lt_friend_help_limit']}">
                        <span class="input-group-addon">次</span>
                        <span class="input-group-addon"></span>
                        <select class="form-control" name="yx_lt_help_user_type">
                            <option value="0" {if !$config['yx_lt_help_user_type']}selected="selected"{/if}>不限制</option>
                            <option value="1" {if $config['yx_lt_help_user_type'] == 1 }selected="selected"{/if}>仅限支付客户</option>
                        </select>
                        <span class="input-group-addon">客资</span>
                        <select class="form-control" name="yx_lt_help_target">
                            <option value="0" {if !$config['yx_lt_help_target']}selected="selected"{/if}>不收集</option>
<!--                            <option value="1" {if $config['yx_lt_help_target'] == 1 }selected="selected"{/if}>手机号</option>-->
                            <option value="2" {if $config['yx_lt_help_target'] == 2 }selected="selected"{/if}>表单收集</option>
                        </select>
                    </div>
                </div>
            </div>
            {/if}
            <div class="form-group">
                <label class="col-sm-2 col-xs-12 control-label">定时奖励</label>
                <div class="col-sm-8 col-xs-12">
                    <div class="input-group">
                        <span class="input-group-addon">每日首次登录</span>
                        <input  type="number" min=0 step=1 class="form-control"  placeholder="必须为大于1" name="yx_lt_timeset"  value="{$config['yx_lt_timeset']}">
                        <span class="input-group-addon">小时后，增加1次抽奖机会；最多</span>
                        <input type="number" class="form-control" min=0 step=1  placeholder="" name="yx_lt_timeset_limit"  value="{$config['yx_lt_timeset_limit']}">
                        <span class="input-group-addon">次</span>
                        <select class="form-control" name="yx_lt_timeset_user_type">
                            <option value="0" {if !$config['yx_lt_timeset_user_type']}selected="selected"{/if}>不限制</option>
                            <option value="1" {if $config['yx_lt_timeset_user_type'] == 1 }selected="selected"{/if}>仅限支付客户</option>
                        </select>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!--	界面设置-->
    <div class="panel panel-default" role="tabpanel">
        <div class="panel-heading">界面设置 </div>
        <div class="panel-body">
            <div class="form-group">
                <label class="col-sm-2 col-xs-12 control-label">显示位置</label>
                <div class="col-sm-9 col-md-8 col-lg-8 col-xs-12">
                    <label class="radio-inline">
                        <input name="yx_lt_show" value="3" {if $config['yx_lt_show']==3} checked="checked"{/if} type="radio"> 顶部显示
                    </label>
                    <label class="radio-inline">
                        <input name="yx_lt_show" value="0" {if $config['yx_lt_show']==0} checked="checked"{/if} type="radio"> 头像下方显示
                    </label>
                    <label class="radio-inline">
                        <input name="yx_lt_show" value="1" {if $config['yx_lt_show']==1} checked="checked"{/if} type="radio"> 中间显示
                    </label>
                    <label class="radio-inline">
                        <input name="yx_lt_show" value="2" {if $config['yx_lt_show']==2} checked="checked"{/if} type="radio"> 底部显示
                    </label>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 col-xs-12 control-label">首页中奖记录以及抽奖攻略</label>
                <div class="col-sm-9 col-md-8 col-lg-8 col-xs-12">
                    <label class="radio-inline">
                        <input name="yx_lt_show_flag_method" value="0" {if $config['yx_lt_show_flag_method']==0} checked="checked"{/if} type="radio"> 显示
                    </label>
                    <label class="radio-inline">
                        <input name="yx_lt_show_flag_method" value="1" {if $config['yx_lt_show_flag_method']==1} checked="checked"{/if} type="radio"> 不显示
                    </label>
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-2 col-xs-12 control-label">首页抽奖活动规则</label>
                <div class="col-sm-9 col-md-8 col-lg-8 col-xs-12">
                    <label class="radio-inline">
                        <input name="yx_lt_show_rules" value="0" {if $config['yx_lt_show_rules']==0} checked="checked"{/if} type="radio"> 显示
                    </label>
                    <label class="radio-inline">
                        <input name="yx_lt_show_rules" value="1" {if $config['yx_lt_show_rules']==1} checked="checked"{/if} type="radio"> 不显示
                    </label>
                </div>
            </div>

            <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">活动规则：</label>
                <div class="col-sm-9 col-xs-12">
                    <table class='table'>
                        <thead>
                        <tr>
                            <th>排序</th>
                            <th>活动规则修改</th>
                            <th>前端规则模拟展示</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody id="yx_lt_rule_items">

                        {loop $config['yx_lt_rules'] $k $yx_lt_rule_item}
                        <tr {if $yx_lt_rule_item['rule_sort']==0 || $yx_lt_rule_item['rule_content']==''}style="display: none;"{/if}>
                            <td class="col-sm-1 col-xs-12">
                                <input name="yx_lt_rule_sort[]" type="text" class="form-control span3" value="{$yx_lt_rule_item['rule_sort']}"/>
                            </td>
                            <td class="col-sm-5 col-xs-12">
                                <input name="yx_lt_format_content[]" type="text" class="form-control span3" value="{$yx_lt_rule_item['format_content']}"/>
                            </td>
                            <td class="col-sm-5 col-xs-12">
                                <input name="yx_lt_rule_content[]" readonly type="text" class="form-control span3" value="{$yx_lt_rule_item['rule_content']}"/>
                            </td>
                            <td >
                                <input  name="yx_lt_rule_id[]" type="hidden" value="{$yx_lt_rule_item['id']}" />
                                <a href='javascript:;' onclick='removeLtRuleItem(this)'><i class='glyphicon glyphicon-remove'></i> 删除</a>
                            </td>
                        </tr>
                        {/loop}
                        </tbody>
                    </table>
                    {if $config['yx_lt_rules']}
                    <a href="javascript:;" onclick="addLtRule();"><i class="glyphicon glyphicon-plus" title="添加规则"></i>添加规则</a>
                    {else}
                    <span style="color: red;">请先提交保存后在进行编辑</span>
                    {/if}
                    <br>
                    <div style="margin-top: 10px;">提示：孕妈宝妈活动可增加配：<span style="color: red;">仅限本地0-12岁宝妈/孕妈参与</span></div>
                </div>
            </div>
            {if $system['softmode']==1 && $system['is_new_wxapp']==1 && $config['yx_lt_mode']==1}
<!--            首页进入抽奖引导图-->
            <div class="form-group">
                <label class="col-sm-2 col-xs-12 control-label">首页进入抽奖引导图</label>
                <div class="col-sm-8 col-xs-12">
                    {php echo view_form_field_image('yx_lt_steer_img',$config['yx_lt_steer_img']);}
                    <span class="help-block"><span style="color: red;">仅对独立页抽奖样式并且抽奖前提条件为无限制生效</span>&nbsp;首页底部按钮上方固定显示</span>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 col-xs-12 control-label">首页进入抽奖按钮文字</label>
                <div class="col-sm-3 col-xs-12">
                    <div class="input-group">
                        <input type="text" class="form-control"  placeholder="" name="lt_into_txt"  value="{$config['lt_into_txt']}">
                    </div>
                    <span class="help-block">默认：查看抽奖</span>
                </div>
            </div>
            {/if}

            <div class="form-group">
                <label class="col-sm-2 col-xs-12 control-label">背景图片</label>
                <div class="col-sm-8 col-xs-12">
                    {php echo view_form_field_image('yx_lt_top_img',$config['yx_lt_top_img']);}
                    {if $config['yx_lt_mode']==1}
                    <span class="help-block">抽奖独立页显示背景，默认：https://css2020.yixuan.net//2020css/lottery/lottery2022/image/bg_01.jpg</span>
                    {else}
                    <span class="help-block">活动内容上方显示，默认：https://css2020.yixuan.net/2020css/plugin/lottery/images/topBg.jpg</span>
                    {/if}
                </div>
            </div>


            <div class="form-group">
                <label class="col-sm-2 col-xs-12 control-label">diy主题</label>
                <div class="col-sm-9 col-md-8 col-lg-8 col-xs-12">
                    <label class="radio-inline">
                        <input name="yx_lt_diy_tc" value="0" {if $config['yx_lt_diy_tc']==0} checked="checked"{/if} type="radio"> 不使用
                    </label>
                    <label class="radio-inline">
                        <input name="yx_lt_diy_tc" value="1" {if $config['yx_lt_diy_tc']==1} checked="checked"{/if} type="radio"> 科技蓝
                    </label>
                </div>
            </div>

<!--            <div class="form-group">-->
<!--                <label class="col-sm-2 col-xs-12 control-label">已中奖人数虚拟</label>-->
<!--                <div class="col-sm-3 col-xs-12">-->
<!--                    <div class="input-group">-->
<!--                        <input type="text" class="form-control"  placeholder="" name="yx_lt_dummy"  value="{$config['yx_lt_dummy']}">-->
<!--                        <span class="input-group-addon">人</span>-->
<!--                    </div>-->
<!--                </div>-->
<!--            </div>-->
            <div class="form-group">
                <label class="col-sm-2 col-xs-12 control-label">无抽奖机会弹窗显示次数</label>
                <div class="col-sm-3 col-xs-12">
                    <div class="input-group">
                        <input  type="number" min=0 step=1 class="form-control"  placeholder="0" name="yx_lt_show_no_chance_num"  value="{$config['yx_lt_show_no_chance_num']}">
                        <span class="input-group-addon">次</span>
                    </div>
                    <span class="help-block" style="color: red;">备注：0次为不弹出，设置次数为用户无抽奖机会后的弹窗总次数</span>
                </div>
            </div>
<!--            <div class="form-group">-->
<!--                <label class="col-sm-2 col-xs-12 control-label">奖品底部提示语</label>-->
<!--                <div class="col-sm-8 col-xs-12">-->
<!--                    <input type="text" class="form-control"  placeholder="" name="yx_lt_btm_tips"  value="{php echo empty($config['yx_lt_btm_tips'])?'温馨提示：查看活动功略，有机会获得更多抽奖机会':$config['yx_lt_btm_tips'];}">-->
<!--                    <span class="help-block">默认：温馨提示：查看活动功略，有机会获得更多抽奖机会</span>-->
<!--                </div>-->
<!--            </div>-->

            <div class="form-group">
                <label class="col-sm-2 col-xs-12 control-label">兑换页核销按钮文字</label>
                <div class="col-sm-8 col-xs-12">
                    <input type="text" class="form-control"  placeholder="" name="yx_lt_convert_btn"  value="{php echo empty($config['yx_lt_convert_btn'])?'请到店出示核销二维码':$config['yx_lt_convert_btn'];}">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 col-xs-12 control-label">兑换底部提示语</label>
                <div class="col-sm-8 col-xs-12">
                    <input type="text" class="form-control"  placeholder="" name="yx_lt_convert_btm_tips"  value="{php echo empty($config['yx_lt_convert_btm_tips'])?'温馨提示：请妥善保管兑奖凭证，手机用户可截图保存':$config['yx_lt_convert_btm_tips'];}">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 col-xs-12 control-label">分享引导图设置</label>
                <div class="col-sm-8 col-xs-12">
                    {php echo view_form_field_image('yx_lt_share_lead_img',$config['yx_lt_share_lead_img']);}
                    <span class="help-block">邀请提示，透明背景，尽量不出现分享字眼 <a style="color: #000000" href="https://css2019.yixuan.net/2019css/default/images/fenxiao.psd" target="_blank">点击下载H5模版</a><a style="color: #000000" href="https://css2019.yixuan.net/2019css/default/images/fenxiaoxcx.psd" target="_blank">点击下载小程序模版</a></span>
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-2 col-xs-12 control-label">幸运星按钮文字</label>
                <div class="col-sm-8 col-xs-12">
                    <input type="text" class="form-control"  placeholder="" name="yx_lt_lucky_btm"  value="{php echo empty($config['yx_lt_lucky_btm'])?'立即抽大奖':$config['yx_lt_lucky_btm'];}">
                    <span class="help-block">当【抽奖机会】=》【进入链接可抽】设置不为0时，则会弹出幸运星，获得抽奖机会</span>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 col-xs-12 control-label">幸运星图标</label>
                <div class="col-sm-8 col-xs-12">
                    {php echo view_form_field_image('yx_lt_lucky_icon',$config['yx_lt_lucky_icon']);}
                    <span class="help-block">默认：https://css2020.yixuan.net/2020css/plugin/lottery/images/stars.jpg</span>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 col-xs-12 control-label">我的奖品页底部提示语</label>
                <div class="col-sm-8 col-xs-12">
                    <input type="text" class="form-control"  placeholder="" name="yx_lt_myprize_tips"  value="{php echo empty($config['yx_lt_myprize_tips'])?'':$config['yx_lt_myprize_tips'];}">
                </div>
            </div>
        </div>
    </div>
    <!--			好友助力-->
    <div class="panel panel-default" role="tabpanel">
        <div class="panel-heading">好友助力设置 </div>
        <div class="panel-body">
            <div class="form-group">
                <label class="col-sm-2 col-xs-12 control-label">好友助力顶部标题</label>
                <div class="col-sm-8 col-xs-12">
                    <input type="text" class="form-control"  placeholder="" name="yx_lt_friend_help_title"  value="{php echo empty($config['yx_lt_friend_help_title'])?'好友助力':$config['yx_lt_friend_help_title'];}">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 col-xs-12 control-label">好友助力顶部提示语</label>
                <div class="col-sm-8 col-xs-12">
                    <input type="text" class="form-control"  placeholder="" name="yx_lt_friend_help_top_tips"  value="{php echo empty($config['yx_lt_friend_help_top_tips'])?'新用户打开您分享的链接，即可助力成功；':$config['yx_lt_friend_help_top_tips'];}">
                    <span class="help-block">默认：只显示当日助力好友信息</span>
                </div>
            </div>
        </div>
    </div>
    <!--			红包相关-->
    {if $system['fenxiao']}
    <div class="panel panel-default" role="tabpanel">
        <div class="panel-heading">红包设置 </div>
        <div class="panel-body">
            <div class="form-group">
                <label class="col-sm-2 col-xs-12 control-label">开启红包奖品</label>
                <div class="col-sm-9 col-md-8 col-lg-8 col-xs-12">
                    <label class="radio-inline">
                        <input name="yx_lt_open_red_package" value="0" {if $config['yx_lt_open_red_package']==0} checked="checked"{/if} type="radio"> 关闭
                    </label>
                    <label class="radio-inline">
                        <input name="yx_lt_open_red_package" value="1" {if $config['yx_lt_open_red_package']==1} checked="checked"{/if} type="radio"> 开启
                    </label>
                    <span class="help-block">提示：如关闭或者不显示开启请到参数设置中检查红包</span>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 col-xs-12 control-label">红包提现最低金额</label>
                <div class="col-sm-8 col-xs-12">
                    <input type="text" class="form-control"  placeholder="" name="red_package_min_amount"  value="{php echo empty($config['red_package_min_amount'])?0.3:$config['red_package_min_amount'];}">
                    <span class="help-block">提示：低于此金额，获得红包无法提现，默认最低提现金额0.3</span>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 col-xs-12 control-label">每日发放红包总金额</label>
                <div class="col-sm-8 col-xs-12">
                    <input type="text" class="form-control"  placeholder="" name="red_envelopes_day_amount"  value="{php echo $config['red_envelopes_day_amount'];}">
                    <span class="help-block">提示：每日的发放红包总金额，发放完毕当日将不会发放。</span>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 col-xs-12 control-label">本次活动发放红包总金额</label>
                <div class="col-sm-8 col-xs-12">
                    <input type="text" class="form-control"  placeholder="" name="red_envelopes_total_amount"  value="{php echo $config['red_envelopes_total_amount'];}">
                    <span class="help-block">提示：本次活动的发放红包总金额，发放完毕将不会发放。</span>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 col-xs-12 control-label">红包金额底部文字</label>
                <div class="col-sm-8 col-xs-12">
                    <input type="text" class="form-control"  placeholder="" name="red_package_btm_tips"  value="{php echo $config['red_package_btm_tips'];}">
                    <span class="help-block">默认：我的红包</span>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 col-xs-12 control-label">红包提现按钮文字</label>
                <div class="col-sm-8 col-xs-12">
                    <input type="text" class="form-control"  placeholder="" name="red_package_right_btn_txt"  value="{php echo $config['red_package_right_btn_txt'];}">
                    <span class="help-block">默认：立即提现</span>
                </div>
            </div>
        </div>
    </div>
    {/if}
    {/if}

</div>
<script>
    $(document).ready(function () {
       var curt_yx_lt_mode =  $("input[name='yx_lt_mode']:checked").val();
       if (curt_yx_lt_mode==0){
           $("#btn_font_set").hide()
           $("#lt_prize_group").hide()
       }else{
           $("#btn_font_set").show()
           $("#lt_prize_group").show()
       }
    });
    $("input[name='yx_lt_mode']").click(function() {
        var value = $(this).val();
        if (value=='0') {
            $("#btn_font_set").hide()
            $("#lt_prize_group").hide()
        }else{
            $("#btn_font_set").show()
            $("#lt_prize_group").show()
        }
    });

    $("input[name='yx_lt_double_flag']").click(function() {
        // var value = $(this).val();
        // if (value=='0') {
        //     $("#yx_lt_chance_limit").val(8)
        //     $("#convert_only").hide()
        // }else{
        //     $("#convert_only").show()
        // }
    });

    function addLtRule() {
        var html = "<tr>";
        html += '<td class="col-sm-1 col-xs-12"><input name="yx_lt_rule_sort[]" type="text" class="form-control span3" value="" /></td>';
        html += '<td class="col-sm-5 col-xs-12"><input name="yx_lt_format_content[]" type="text" class="form-control span3" value="" /></td>';
        html += '<td class="col-sm-5 col-xs-12"><input name="yx_lt_rule_content[]" readonly type="text" class="form-control span3" value="" /></td>';
        html += '<td><input  name="yx_lt_rule_id[]" type="hidden" value="" /><a href="javascript:;" onclick="removeLtRuleItem(this)" ><i class="glyphicon glyphicon-remove"></i> 删除</a></td>';
        html += "</tr>";
        $("#yx_lt_rule_items").append(html);
    }
    function removeLtRuleItem(obj) {
        $(obj).parent().parent().remove();
    }
</script>